package ch.fusun.baron.basic.turntask;

import ch.fusun.baron.city.City;
import ch.fusun.baron.city.api.CityService;
import ch.fusun.baron.core.injection.Configure;
import ch.fusun.baron.core.injection.Inject;
import ch.fusun.baron.turn.TurnTask;

/**
 * Lets cities grow by 1
 */
public class CityIncreasePopulationTurnTask implements TurnTask {

	@Inject
	private CityService cityService;
	@Configure(value = "10")
	private int CITY_INCREASE;

	/**
	 * Constructor
	 */
	public CityIncreasePopulationTurnTask() {
	}

	@Override
	public void execute() {
		for (City city : cityService.getCities()) {
			city.increasePopulation(CITY_INCREASE);
		}
	}

}
